package test08;

import java.io.File;
import java.util.Scanner;

public class TestDemo02 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入文件路径,格式如：C:\\34\\re\\44");
        String src = scanner.next();
        File file = new File(src);
        lookingFile(file);
    }

    private static void lookingFile(File file) {
        File[] files = file.listFiles();
        for (File file1 : files) {
            if (file1.isDirectory()){
                lookingFile(file1);
            }else {
                if (getSize(file1) > 200*1024){
                    System.out.println(file1.getAbsoluteFile());
                }
            }
        }
    }

    public static long getSize(File file){
        long length = file.length();
        return length;
    }
}
